package com.kermel.andromeda.activities.triggered;

import android.app.Activity;
import android.content.Context;
import android.view.View.OnClickListener;

import com.kermel.andromeda.data.Alarm;

abstract class AbstractTriggeredAlarmActivityAction implements OnClickListener {
    private Activity activity;
    private Alarm alarm;

    public AbstractTriggeredAlarmActivityAction(Activity activity, Alarm alarm) {
        this.activity = activity;
        this.alarm = alarm;
    }
    
    protected boolean isAlarmNull() {
        return alarm == null;
    }
    
    protected void causeActivityToFinish() {
        activity.finish();
    }
    
    protected Alarm getAlarm() {
        return alarm;
    }
    
    protected Context getContext() {
        return activity;
    }
}
